package com.mikasa.springboot.example.rabbitmq.demo;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * Created by User on 17/1/16.
 */

@Component
@RabbitListener(queues = "hello")
public class Receiver {

    private static final Logger LOGGER = LoggerFactory.getLogger(Sender.class);

    @RabbitHandler
    public void handle(String message) {
        LOGGER.info("Receiver : " + message);
    }
}
